From 195e18e90abf1e641037b84a0e44dbf5c6aa8265 Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Tue, 13 Nov 2012 04:04:24 +0200
Subject: [PATCH 09/22] Another fix for possible SIGSEGV in src/base/fm-path.c.

---
 src/base/fm-path.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/base/fm-path.c b/src/base/fm-path.c
index b90aeab..e4a0251 100644
--- a/src/base/fm-path.c
+++ b/src/base/fm-path.c
@@ -245,6 +245,8 @@ static inline FmPath* _fm_path_reuse_existing_paths(FmPath* parent, const char*
  * Creates new #FmPath for child of @parent directory which have name
  * @basename. The string length of @basename is @name_len. @basename is
  * in glib filename encoding (can be non-UTF-8) of target filesystem.
+ * If @parent is %NULL then @basename assumed to be root of some file
+ * system.
  *
  * Returns: (transfer full): a new #FmPath for the path. You have to call
  * fm_path_unref() when it's no longer needed.
@@ -341,7 +343,7 @@ FmPath* _fm_path_new_child_len(FmPath* parent, const char* basename, int name_le
 FmPath* fm_path_new_child_len(FmPath* parent, const char* basename, int name_len)
 {
     return _fm_path_new_child_len(parent, basename, name_len,
-                                  fm_path_is_native(parent));
+                                  parent && fm_path_is_native(parent));
 }
 
 /**
-- 
1.8.0.1

